import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ReactiveFormsModule } from '@angular/forms';
import { ReactiveformRoutingModule } from './reactiveform-routing.module';
import { ReactiveformComponent } from './reactiveform.component';
import { HeroService }         from './hero.service';
import { HeroDetailComponent } from './hero-detail.component'; //  <-- #1 import service

@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,
    ReactiveformRoutingModule
  ],
  declarations: [ReactiveformComponent, HeroDetailComponent],
  providers: [ HeroService ], // <-- #4 provide HeroService
})
export class ReactiveformModule { }
